
module.exports = async (ctx, next) => {
    const { model } = ctx.params;
    const { fields:{device} } = ctx.request.body;
    if(model==='student'&& (!device||device==='null')){
        return ctx.badRequest(null, [{ messages: [{ id: '请指定设备' }] }]);
    }
    await next();

};
